home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
Buch
/
Linien1.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1998-12-22
|
968b
|
26 lines
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "Linien1.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
// Rechteck und Ellipse
Canvas->Rectangle (10, 10, ClientWidth-10, ClientHeight-10);
Canvas->Ellipse (20, 20, ClientWidth-20, ClientHeight-20);
// Kreuz
Canvas->MoveTo (0, ClientHeight/2);
Canvas->LineTo (ClientWidth, ClientHeight/2);
Canvas->MoveTo (ClientWidth/2, 0);
Canvas->LineTo (ClientWidth/2, ClientHeight);
}
//---------------------------------------------------------------------------